﻿using System;
using System.Collections.Generic;
using System.Text;
using SchEdu.Framework.Algorithm;
using SchEdu.Framework.Algorithm.Rules;
using SchEdu.Framework.DataModel;
using SchEdu.Framework.Validators;

namespace FAM_DR
{
    class FAM_LPTAlgorithm : FAM
    {
        protected override SchEduDataSet.OperationRow ApplyDispatchRule(int t,SchEduDataSet.MachineRow machine, OperationList operations)
        {
            SchEduDataSet.OperationRow operation = null;
            foreach (SchEduDataSet.OperationRow op in operations)
            {
                if (operation == null)
                {
                    operation = op;
                }
                if (op.ProcessingTime > operation.ProcessingTime)
                {
                    operation = op;
                }
            }
            return operation;
        }

        public override AboutInfo AboutInfo
        {
            get
            {
                AboutInfo aboutInfo = new AboutInfo();
                aboutInfo.Title = "FAM LPT";
                aboutInfo.Description = Resources.FAM_LPTAlgorithmDescription;
                aboutInfo.Guid = new Guid("{B8D40CC9-43BE-48d3-BB75-39D5AD1346E7}");
                return aboutInfo;
            }
        }

    }
}
